package com.lfy.Factor.comm.abs.dfg;

import com.lfy.Factor.comm.abs.CaoS;

import java.util.ArrayList;
import java.util.List;

public class ghj {
    private List<Tre> list = new ArrayList<>();
    private static ghj facotry = new ghj();

    public static ghj getInstance(){
        return facotry;
    }

    public void register(Tre caoS){
        list.add(caoS);
    }

    public String parse(Integer code){
        for (Tre caoService : list) {
            if(caoService.code(code)){
                return caoService.name();
            }
        }
        return null;
    }
}
